#include <pcap.h>
#include <hiredis/hiredis.h>
#include <pthread.h>

#define QUEUE_SIZE 1024*1024  // 1MB内存队列
#define REDIS_KEY "packet_queue" 

// 线程安全队列结构体
typedef struct {
    uint8_t *buffer;
    int head;
    int tail;
    size_t capacity;
    pthread_mutex_t lock;
    pthread_cond_t cond;
} ThreadSafeQueue;

// Redis连接配置
typedef struct {
    char *host;
    int port;
    char *password;
} RedisConfig;

